package com.enzoism.spring.service.impl;

import com.enzoism.spring.model.User;
import com.enzoism.spring.service.UserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * User: enzoism
 * Date: 2020/2/7- 10:15
 */
@Service
public class UserServiceImpl implements UserService {

    public User getUserByEmailAndPassword(String email, String password) {
        if (StringUtils.equalsIgnoreCase("admin@qq.com",email)
                && StringUtils.equalsIgnoreCase("admin",password)){
            return new User("admin@qq.com");
        }else{
            return null;
        }
    }
}
